package com.ruoyi.shopping.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shopping.mapper.MallCommissionWithdrawMapper;
import com.ruoyi.shopping.domain.MallCommissionWithdraw;
import com.ruoyi.shopping.service.IMallCommissionWithdrawService;

/**
 * 佣金提现审核Service业务层处理
 *
 * @author scx
 * @date 2022-06-10
 */
@Service
public class MallCommissionWithdrawServiceImpl implements IMallCommissionWithdrawService
{
    @Autowired
    private MallCommissionWithdrawMapper mallCommissionWithdrawMapper;

    /**
     * 查询佣金提现审核
     *
     * @param id 佣金提现审核主键
     * @return 佣金提现审核
     */
    @Override
    public MallCommissionWithdraw selectMallCommissionWithdrawById(Long id)
    {
        return mallCommissionWithdrawMapper.selectMallCommissionWithdrawById(id);
    }

    /**
     * 查询佣金提现审核列表
     *
     * @param mallCommissionWithdraw 佣金提现审核
     * @return 佣金提现审核
     */
    @Override
    public List<MallCommissionWithdraw> selectMallCommissionWithdrawList(MallCommissionWithdraw mallCommissionWithdraw)
    {
        return mallCommissionWithdrawMapper.selectMallCommissionWithdrawList(mallCommissionWithdraw);
    }

    /**
     * 新增佣金提现审核
     *
     * @param mallCommissionWithdraw 佣金提现审核
     * @return 结果
     */
    @Override
    public int insertMallCommissionWithdraw(MallCommissionWithdraw mallCommissionWithdraw)
    {
        mallCommissionWithdraw.setCreateTime(DateUtils.getNowDate());
        return mallCommissionWithdrawMapper.insertMallCommissionWithdraw(mallCommissionWithdraw);
    }

    /**
     * 修改佣金提现审核
     *
     * @param mallCommissionWithdraw 佣金提现审核
     * @return 结果
     */
    @Override
    public int updateMallCommissionWithdraw(MallCommissionWithdraw mallCommissionWithdraw)
    {
        mallCommissionWithdraw.setUpdateTime(DateUtils.getNowDate());
        return mallCommissionWithdrawMapper.updateMallCommissionWithdraw(mallCommissionWithdraw);
    }

    /**
     * 批量删除佣金提现审核
     *
     * @param ids 需要删除的佣金提现审核主键
     * @return 结果
     */
    @Override
    public int deleteMallCommissionWithdrawByIds(Long[] ids)
    {
        return mallCommissionWithdrawMapper.deleteMallCommissionWithdrawByIds(ids);
    }


    /**
     * 批量逻辑删除佣金提现审核
     *
     * @param ids 需要删除的佣金提现审核主键
     * @return 结果
     */
    @Override
    public int logicDeleteMallCommissionWithdraw(Long[] ids,String delType,Long delUser)
    {
        return mallCommissionWithdrawMapper.logicDeleteMallCommissionWithdraw(ids,delType,delUser);
    }

    /**
     * 删除佣金提现审核信息
     *
     * @param id 佣金提现审核主键
     * @return 结果
     */
    @Override
    public int deleteMallCommissionWithdrawById(Long id)
    {
        return mallCommissionWithdrawMapper.deleteMallCommissionWithdrawById(id);
    }
}
